package Agency.views;
import java.awt.Color;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JTextField;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author wangari
 */
public class AddNewHouse extends javax.swing.JFrame {

    /**
     * Creates new form AddNewHouse and sets the background color to light gray
     */
    public AddNewHouse() {
        this.getContentPane().setBackground(Color.LIGHT_GRAY);
        initComponents();
        setLocationRelativeTo(null);
    }
   /**
    * JComboBox to get the house type
    * @return jCTheHouseType
    */ 
    public JComboBox getHseType(){
        return jCTheHouseType;
        
    }
    /**
     * ComboBox to get the town location 
     * @return jCTheTownLocation
     */
    public JComboBox getTownLocation(){
        return jCTheTownLocation;
        }
    /**
     * TextField to show the house rent
     * @return  jTRent
     */
    public JTextField getRent(){
        return jTRent;
    }
    /**
     * TextField to take the plot number 
     * @return jTPlotNum
     */
    public JTextField getPlotNum(){
        return jTPlotNum;
    }
    /**
     * Button to save the new house details
     * @return jBSaveDetails
     */
    public JButton saveDetails(){
        return jBSaveDetails;
    }
    /**
     * Button to close the view
     * @return jBClose
     */
    public JButton close(){
        return jBClose;
    }
    

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLhsetype = new javax.swing.JLabel();
        jCTheHouseType = new javax.swing.JComboBox();
        jLtown = new javax.swing.JLabel();
        jLrent = new javax.swing.JLabel();
        jCTheTownLocation = new javax.swing.JComboBox();
        jTRent = new javax.swing.JTextField();
        jBSaveDetails = new javax.swing.JButton();
        jLplotnum = new javax.swing.JLabel();
        jTPlotNum = new javax.swing.JTextField();
        jBClose = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setText("New House");

        jLhsetype.setText("House Type");

        jCTheHouseType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Apartment", "3Bedroom", "2Bedroom", "1Bedroom", "BedSitter", "SingleRoom" }));

        jLtown.setText("Town Location");

        jLrent.setText("House Rent per Mnth");

        jCTheTownLocation.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Accra", "Madina", "Kwabenya", "Comet", "East Legon", "Dzorwulu", "Lapaz", "Ridge", "Airport Residential" }));

        jTRent.setColumns(20);

        jBSaveDetails.setText("Save Details");

        jLplotnum.setText("House plot num");

        jBClose.setText("Close");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(239, 239, 239)
                        .addComponent(jLabel1))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLplotnum)
                        .addGap(116, 116, 116)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTPlotNum, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jBSaveDetails)
                                .addGap(92, 92, 92)
                                .addComponent(jBClose, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLrent)
                            .addComponent(jLtown)
                            .addComponent(jLhsetype))
                        .addGap(94, 94, 94)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jCTheHouseType, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jCTheTownLocation, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTRent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(108, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(77, 77, 77)
                        .addComponent(jLhsetype, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(66, 66, 66)
                        .addComponent(jCTheHouseType, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(42, 42, 42)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLtown, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jCTheTownLocation, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTRent, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLrent))
                .addGap(59, 59, 59)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLplotnum)
                    .addComponent(jTPlotNum, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(33, 33, 33)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jBClose, javax.swing.GroupLayout.DEFAULT_SIZE, 34, Short.MAX_VALUE)
                    .addComponent(jBSaveDetails, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

  


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBClose;
    private javax.swing.JButton jBSaveDetails;
    private javax.swing.JComboBox jCTheHouseType;
    private javax.swing.JComboBox jCTheTownLocation;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLhsetype;
    private javax.swing.JLabel jLplotnum;
    private javax.swing.JLabel jLrent;
    private javax.swing.JLabel jLtown;
    private javax.swing.JTextField jTPlotNum;
    private javax.swing.JTextField jTRent;
    // End of variables declaration//GEN-END:variables
}
